package com.eliansun.util;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

/**
 * @author ljh
 * @create 2017-08-03 15:31
 **/
public class WebDriverPath {
    public static void setPath() {
        System.setProperty("webdriver.chrome.driver", "D:\\chromedriver\\chromedriver.exe");
    }

    public static WebDriver getWebDriver(String url) {
        setPath();
        WebDriver webDriver = new ChromeDriver();
        webDriver.get(url);
        return webDriver;
    }

    public static void main(String[] args) {
        WebDriver webDriverPath = WebDriverPath.getWebDriver("D:\\chromedriver\\chromedriver.exe");
    }
}
